// Library functions
#define exit(x)                      mock_ptr->exit(x)
#define pthread_create(x, y, z, a)   mock_ptr->pthread_create(x, y, z, a)
#define pthread_cancel(x)            mock_ptr->pthread_cancel(x)
#define pthread_join(x, y)           mock_ptr->pthread_join(x, y)
#define pthread_mutex_init(x, y)     mock_ptr->pthread_mutex_init(x, y)
#define pthread_cond_init(x, y)      mock_ptr->pthread_cond_init(x, y)
#define pthread_cond_signal(x)       mock_ptr->pthread_cond_signal(x)
#define pthread_cond_destroy(x)      mock_ptr->pthread_cond_destroy(x)
#define pthread_mutex_lock(x)        mock_ptr->pthread_mutex_lock(x)
#define pthread_mutex_trylock(x)     mock_ptr->pthread_mutex_trylock(x)
#define pthread_mutex_unlock(x)      mock_ptr->pthread_mutex_unlock(x)
#define pthread_mutex_destroy(x)     mock_ptr->pthread_mutex_destroy(x)
#define open(x, ... )                mock_ptr->open(x)
#define read(x, y, z)                mock_ptr->read(x, y, z)
#define write(x, y, z)               mock_ptr->write(x, y, z)
#define sendto(x, y, z, a, b, c)     mock_ptr->sendto(x, y, z, a, b, c)
#define recvfrom(x, y, z, a, b, c)   mock_ptr->recvfrom(x, y, z, a, b, c)
#define stat(x, y)                   mock_ptr->stat(x, y)
#define close(x)                     mock_ptr->close(x)
#define strncmp(x, y, z)             mock_ptr->strncmp(x, y, z)
#define socket(x, y, z)              mock_ptr->socket(x, y, z)
#define connect(x, y, z)             mock_ptr->connect(x, y, z)

// Static functions
#define agent_cleanup()              mock_ptr->agent_cleanup()
#define as_write(x, y, z)            mock_ptr->as_write(x, y, z)
#define as_read(x, y, z)             mock_ptr->as_read(x, y, z)
#define ecm_write(x)                 mock_ptr->ecm_write(x)
#define ecm_read()                   mock_ptr->ecm_read()
#define set_agent_action(x)          mock_ptr->set_agent_action(x)
#define import_host_file()           mock_ptr->import_host_file()
#define export_guest_file()          mock_ptr->export_guest_file()
#define execute_guest_cmd_return()   mock_ptr->execute_guest_cmd_return()
#define execute_guest_cmd_noreturn() mock_ptr->execute_guest_cmd_noreturn()
#define sync_cache()                 mock_ptr->sync_cache()
#define export_agent_log()           mock_ptr->export_agent_log()
#define connect_agent_server()       mock_ptr->connect_agent_server()

// Public API
#define agent_printf(x, ...)         mock_ptr->agent_printf(x)
#define agent_init(x, y, z)          mock_ptr->agent_init(x, y, z)
